<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@page contentType="text/html;charset=utf-8" %>

<%
    String[] usernames={"zhansgan","lisi","wangwu"};
    request.setAttribute("nameArray",usernames);

    List<String> list=new ArrayList<>();
    list.add("abc");
    list.add("edf");
    request.setAttribute("myList",list);
%>

${nameArray}<br/>
${nameArray[0]}<br/>
${nameArray[1]}<br/>
${nameArray[2]}<br/>
${nameArray[3]}<br/>

${myList[0]}<br/>
${myList[1]}<br/>
